import request from '@/utils/request'

// 查询竞品信息列表
export function listCompanyCompetitor(query) {
  return request({
    url: '/competitor/companyCompetitor/list',
    method: 'get',
    params: query
  })
}

// 查询竞品信息详细
export function getCompanyCompetitor(id) {
  return request({
    url: '/competitor/companyCompetitor/' + id,
    method: 'get'
  })
}

// 保存竞品信息
export function saveCompanyCompetitor(data) {
  return request({
    url: '/competitor/companyCompetitor/save',
    method: 'post',
    data: data
  })
}

// 删除竞品信息
export function delCompanyCompetitor(id) {
  return request({
    url: '/competitor/companyCompetitor/' + id,
    method: 'delete'
  })
}

// 导出竞品信息
export function exportCompanyCompetitor(query) {
  return request({
    url: '/competitor/companyCompetitor/export',
    method: 'get',
    params: query
  })
}

// // 用户头像上传
export function uploadAvatar(data) {
  return request({
    url: '/competitor/companyCompetitor/avatar',
    method: 'post',
    data: data
  })
}
